<!-- 水系-面 -->
<template>
    <el-drawer v-model="addDrawer" size="50%" :show-close="false" @opened="openDrawer" @close="closeDrawer">
        <template #title>
            <h2><svg-icon icon-class="list"></svg-icon><span style="padding-left: 15px">{{ typeName }}</span></h2>
            <el-button type="primary" @click="confirmClick" :disabled="drawerLoading" v-if="isShowSave">保存</el-button>
            <el-button type="primary" @click="closeDrawer">关闭</el-button>
        </template>
        <template #default>
            <el-form :model="form" ref="addRef" :inline="true" :rules="formRules" label-width="200px"
                v-loading="drawerLoading">
                <el-row justify="space-between">
                    <el-form-item label="省">
                        <el-input v-model="form.province" clearable disabled></el-input>
                    </el-form-item>
                    <el-form-item label="市">
                        <el-input v-model="form.city" clearable disabled></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="区/县">
                        <el-input v-model="form.county" clearable disabled></el-input>
                    </el-form-item>
                    <el-form-item label="OBJECTID" prop="objectId">
                        <el-input v-model="form.objectId" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="SHAPE" prop="shape">
                        <el-input v-model="form.shape" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="GB" prop="gb">
                        <el-input v-model="form.gb" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="HYDC" prop="hydc">
                        <el-input v-model="form.hydc" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="NAME" prop="name">
                        <el-input v-model="form.name" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="WQL" prop="wql">
                        <el-input v-model="form.wql" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="VOL" prop="vol">
                        <el-input v-model="form.vol" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="PERIOD" prop="period">
                        <el-input v-model="form.period" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="TYPE" prop="type">
                        <el-input v-model="form.type" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="FEAID" prop="feaid">
                        <el-input v-model="form.feaid" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="DATE" prop="date">
                        <el-input v-model="form.date" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
                <el-row justify="space-between">
                    <el-form-item label="STACOD" prop="stacod">
                        <el-input v-model="form.stacod" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                    <el-form-item label="VERS" prop="vers">
                        <el-input v-model="form.vers" placeholder="请输入" clearable></el-input>
                    </el-form-item>
                </el-row>
            </el-form>
        </template>
    </el-drawer>
</template>
<script setup>
// 引入基础方法
import useSpatialData from '@/hooks/useSpatialData';
// 引入表单验证规则
// import { eightDouble, fourInt } from '@/utils/validate';
const { route, addDrawer, drawerLoading, form, typeName, openDrawer, closeDrawer, confirmClick, uploadSuccess, deleteFile, isShowSave } = useSpatialData();
// 表单验证规则
const formRules = {
    // id: [{ required: true, message: '请输入编号！', trigger: 'blur' }],
}
</script>
<style lang="scss" scoped></style>